/**
   \file  siagian.hh
   \brief Implementation of the siagian algorithm.

   This file defines a class that encapsulates the details of the
   siagian algorithm.
*/

/*
   This file is part of libgist.

   libgist is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
   Free Software Foundation; either version 2 of the License, or (at your
   option) any later version.

   libgist is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
   for more details.

   You should have received a copy of the GNU General Public License
   along with libgist; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/

/*
   REVISION HISTORY

   $HeadURL: http://libgist.googlecode.com/svn/branches/siagian_dev/src/siagian.hh $
   $Id: siagian.hh 134 2012-02-10 06:09:33Z christian.g.siagian@gmail.com $
*/

#ifndef LIBGIST_SIAGIAN_DOT_HH
#define LIBGIST_SIAGIAN_DOT_HH

//------------------------------ HEADERS --------------------------------

// Boost.GIL
#include <boost/gil/typedefs.hpp>
#include <boost/gil/image.hpp>

// Standard C++
#include <string>

//----------------------- NAMESPACE DEFINITION --------------------------

namespace gist {

//------------------------- CLASS DEFINITION ----------------------------

/**
   \brief Encapsulates the details of the siagian algorithm.

*/
class siagian {
   // All the implementation details are hidden in the siagian.cc file
   // behind an opaque object pointed to by this data member.
   void* p_impl ;

public:
   /// Initialization.
   siagian() ;

   /**
      \brief  Collect training data.
      \param  cat Image category.
      \param  img Training image (grayscale).
      \return Nothing.

      This method is meant to be called repeatedly in training mode. For
      each training image, clients should specify the category to which
      it belongs. These category labels will be output during image
      classification.

      The method is thread-safe. Thus, clients may load training images
      in multiple threads and pass them to this function without having
      to worry about threading-related synchronization.
   */
   void data(const std::string& cat, const boost::gil::rgb8_image_t& img) ;

   /**
      \brief  Train the siagian algorithm.
      \return Nothing.

      This method uses all the data collected by the siagian::data()
      function to ...
   */
   void train() ;

   /// Clean-up.
   ~siagian() ;
} ;

//-----------------------------------------------------------------------

} // end of namespace encapsulating this file's definitions

#endif

/* So things look consistent in everyone's emacs... */
/* Local Variables: */
/* indent-tabs-mode: nil */
/* End: */

